home *** CD-ROM | disk | FTP | other *** search
- onClipEvent(enterFrame){
- if(_X <= 0)
- {
- _X = 10;
- }
- else if(_X >= 590)
- {
- _X = 580;
- }
- if(_root.amitavaplay == true)
- {
- if(Key.isDown(38) && waking == 1 && _Y > 50)
- {
- if(cach == 1)
- {
- this._rotation = 0;
- this.gotoAndStop(2);
- mov = 3;
- }
- }
- else if(Key.isDown(40) && waking == 1 && _Y < 500)
- {
- if(cach == 1)
- {
- this._rotation = 180;
- this.gotoAndStop(2);
- mov = -3;
- }
- }
- else if(Key.isDown(39) && waking == 1 && _X < 550)
- {
- if(cach == 1)
- {
- this._rotation = 90;
- this.gotoAndStop(3);
- movx = -3;
- }
- }
- else if(Key.isDown(37) && waking == 1 && _X > 50)
- {
- if(cach == 1)
- {
- this._rotation = -90;
- this.gotoAndStop(3);
- movx = 3;
- }
- }
- if(this.hitTest(_root.banana))
- {
- if(cach == 1)
- {
- if(food <= 4)
- {
- food += 1;
- _root.banana._visible = false;
- this.gotoAndStop(4);
- cach = 0;
- }
- if(food == 4)
- {
- if(lev == 1)
- {
- if(_root.amitavalife > 0)
- {
- _root.levl.gotoAndPlay(2);
- lev = 0;
- }
- }
- }
- }
- }
- }
- }
-